<?php
namespace Home\Controller;
use Think\Controller;

header("content-Type: text/html; charset=Utf-8");

class EmailController extends Controller {

    public function index(){
    	$db_test = M('test');
    	$data['addr1'] = I('addr1');
    	$data['addr2'] = I('addr2');
    	$data['addr3'] = I('addr3');
    	$data['body'] = I('body');
    	$data['image'] = I('image');
    	$db_test->add($data);

        if(sendMail(I('addr1'),"<img src='test.png'/>","test"))
            $this->success('发送成功！');
        else
            $this->error('发送失败');
    }

}